package com.sskj.gocoin.v.fragment;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.gocoin.m.HttpConfig;
import com.sskj.gocoin.m.bean.HttpData;
import com.sskj.gocoin.m.bean.bean.Banner;
import com.sskj.gocoin.m.http.JsonCallBack;
import com.sskj.gocoin.p.base.BasePresenter;

class MarketFragmentPresenter extends BasePresenter<MarketFragment> {
    /**
     * 获取Banner和Banner下面的推送信息
     */
    public void getBannerUrl() {
        OkGo.<HttpData<Banner>>get(HttpConfig.BASE_URL + HttpConfig.COIN_FEE)
                .execute(new JsonCallBack<HttpData<Banner>>(this) {
                    @Override
                    protected void _onSuccess(Response<HttpData<Banner>> response) {
                        mView.showBanner(response.body().getData());
                    }
                });
        ;
    }

}
